<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<head>
  <meta charset="UTF-8">
  <title>Farmland</title>
  <meta charset="gb2312" />
  <link rel="stylesheet" href="css/grid.css"/>
  <style type="text/css">
    .a-upload {
      padding: 4px 10px;
      height: 20px;
      line-height: 20px;
      position: relative;
      cursor: pointer;
      color: #888;
      background: #fafafa;
      border: 1px solid #ddd;
      border-radius: 4px;
      overflow: hidden;
      display: inline-block;
      *display: inline;
      *zoom: 1
    }

    .a-upload  input {
      position: absolute;
      font-size: 100px;
      padding: 4px 5px;
      background: #ffffff;
      min-width:160%;
      right: 0;
      top: 0;
      opacity: 0;
      filter: alpha(opacity=0);
      cursor: pointer
    }

    .a-upload:hover {
      color: #444;
      background: #eee;
      border-color: #ccc;
      text-decoration: none
    }
    /* a file */
    .file {
      position: relative;
      display: inline-block;
      background-color: #409EFF;
      color: white;
      /*border-radius: 4px;*/
      padding: 10px 5px;
      /*overflow: hidden;*/
      margin-left: 0px;
      text-decoration: none;
      text-indent: 0;
      font-size: 12px;
      font-weight: bold;
      line-height: 12px;
    }
    .file input {
      position: absolute;
      right: 0;
      top: 0;
      opacity: 0;/*关键点*/
      filter: alpha(opacity=0);/*兼容ie*/
      /*font-size: 40px;!* 增大不同浏览器的可点击区域 *!*/
      cursor: pointer;
    }
    /*.file:hover {*/
      /*background: #AADFFD;*/
      /*border-color: #78C3F3;*/
      /*color: #004974;*/
      /*text-decoration: none;*/
    /*}*/
    .return {
      cursor: pointer;
      background-color: white;
      color: black;
      font-size: 12px;
    }
  </style>
  <script src="jquery-1.8.1.js"></script>
  <script type="text/javascript" src="js/html2canvas.js"></script>
  <script src="js/jquery-ui.min.js"></script>
  <script src="js/Farmland.js"></script>
</head>

<body>
<div class="nav">
  <form action="">
    <ul class="navigation" >
      <li>
        <label for="" style="font-size: 12px">试验田名称:</label>
        <input style="border: 1px solid #ccc;
                padding: 5px 0px;
                border-radius: 3px; /*css3属性IE不支持*/
                padding-left:5px; " type="text" value="" id="pId"/>
      </li>
      <li>
        <label for="" style="font-size: 12px">横向宽度:</label>
        <input  style="width: 25px;border: 1px solid #ccc;
                padding: 5px 0px;
                border-radius: 3px; /*css3属性IE不支持*/
                padding-left:5px; "  type="text" value="" id="width"/>
        <label style="font-size: 12px">米</label>
      </li>
      <li>
        <label for="" style="font-size: 12px">纵向长度:</label>
        <input  style="width: 25px;border: 1px solid #ccc;
                padding: 5px 0px;
                border-radius: 3px; /*css3属性IE不支持*/
                padding-left:5px; " type="text" value="" id="height"/>
        <label style="font-size: 12px">米</label>
      </li>
      <li>
        <label for="sel" style="font-size: 12px">棚内（外）:</label>
        <select required name="" id="sel" style="border: #ccc solid 1px;font-size: 12px">
          <option value="" style="font-size: 12px">请选择</option>
          <option value="greenhouse" style="font-size: 12px">棚 内</option>
          <option value="common" style="font-size: 12px">棚 外</option>
        </select>
      </li>


      <li>
        <label id="num_notice" style="visibility: hidden;font-size: 10px">品种数量</label>
        <input  id="num" type="text" style="visibility:hidden;width: 20px;border: #ccc solid 1px" >
        <label id="type_notice" style="visibility: hidden;font-size: 10px">试验类型</label>
        <input  id="type" type="text" style="visibility:hidden;width: 40px;border: #ccc solid 1px" >
      </li>
      <li><button id="confirm" class="state" style="cursor: pointer;background-color: #409EFF;color: white;font-size: 13px;">新建</button></li>
      <li> <button class="cancel" style="cursor: pointer;background-color: #409EFF;color: white;font-size: 13px;">撤回</button></li>
      <li><button class="save" style="cursor: pointer;background-color: #409EFF;color: white;font-size: 13px;" >保存</button></li>
      <li><input type='file'  style="cursor:pointer;color:#000000;opacity: 0;cursor: pointer" id='pic_img'></li>
      <li><a href="javascript:;" class="file">选择文件
        <input type="file"  name="" id="file2">
      </a></li>
      <li><div class="showFileName" style="width: 60px;font-size: 5px"></div></li>
      <li><input  type="button" class="upload" style="cursor:pointer;color:#000000;background-color: #409EFF;color: white;padding: 4px 5px;font-size: 13px; " value='上传'> </button></li>
      <li><button class="return" onClick="custom_close()" style="cursor: pointer;background-color: #409EFF;color: white;font-size: 13px;">关闭</button></li>
    </ul>
  </form>
</div>

<div class="flag" >
  <span class="text">西</span>
  <div class="ico_up"></div>
  <div class="line"></div>
</div>

<!--<form id ="sText" style="overflow-y: auto;height: 60px">-->
<!--<div  id="drag" style="margin-right: 50px" > </div>-->
<!--</form>-->


  <div id="parent"  style="margin-bottom: 20px; border:1px solid #000000 ">
    <!--<div  id="containment-wrapper" >-->
    <!--</div>-->
  </div>
  <br>
  <!--<div class="Tb">-->
    <!--&lt;!&ndash;<table id = "tb" class="expTb" >&ndash;&gt;-->


    <!--&lt;!&ndash;</table>&ndash;&gt;-->
  <!--</div>-->

<!--<form enctype="multipart/form-data" id="uploadForm">-->
  <!--<input type='file' name='xxx' id='pic_img'>-->
  <!--<input type='button' class="upload"  value='点击上传'>-->
<!--</form>-->


<div style="clear:both;">

</div>

</body>
<script>
  $("body a").on("change","input[type='file']",function(){
    var filePath=$(this).val();
    if(filePath.indexOf("jpg")!=-1 || filePath.indexOf("png")!=-1){
      $(".fileerrorTip").html("").hide();
      var arr=filePath.split('\\');
      var fileName=arr[arr.length-1];
      $(".showFileName").html(fileName);
    }else{
      $(".showFileName").html("");
      $(".fileerrorTip").html("非jpg,png格式：您未上传文件，或者您上传文件类型有误！").show();
      return false
    }
  });
  function custom_close() {
    if
    (confirm('您确定要关闭本页吗？')) {
      window.opener = null
      window.open('', '_self')
      window.close()
    } else {}
  }
</script>


</html>
